#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int a = 0, b = 0;
	scanf_s("%d %d", &a, &b);
	int num1 = a / b;
	int num2 = a % b;
	//printf("%d %d\n", num1, num2);
	printf("%d %d\n", a/b, a%b);

	return 0;
}